reporegistry: do not prepend repositories in confPaths#1179
Merged
achilleas-k merged 2 commits intoosbuild:mainfrom Feb 7, 2025
Merged
reporegistry: do not prepend repositories in confPaths#1179achilleas-k merged 2 commits intoosbuild:mainfrom
repositories in confPaths#1179achilleas-k merged 2 commits intoosbuild:mainfrom
Conversation
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Jan 29, 2025
This commit changes cmd/composer to use the `reporegistry.New` call again. This is a preparation for osbuild/images#1179 And undoes parts of osbuild#4378 but that is no longer necessary because in osbuild/images#946 the error is now passed on from `reporegistry.New()` in the same way as from `LoadRepositories()`.
This was referenced Jan 29, 2025
thozza
reviewed
Jan 29, 2025
Member
thozza
left a comment
There was a problem hiding this comment.
The idea of the change looks good to me, but the code needs some fixes for tests to pass...
thozza
pushed a commit
to osbuild/osbuild-composer
that referenced
this pull request
Jan 29, 2025
This commit changes cmd/composer to use the `reporegistry.New` call again. This is a preparation for osbuild/images#1179 And undoes parts of #4378 but that is no longer necessary because in osbuild/images#946 the error is now passed on from `reporegistry.New()` in the same way as from `LoadRepositories()`.
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Jan 29, 2025
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Jan 29, 2025
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Jan 29, 2025
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Jan 30, 2025
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Jan 30, 2025
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Jan 31, 2025
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Feb 4, 2025
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Feb 5, 2025
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
58d5ea2 to
afe4cc0
Compare
Contributor
|
This PR changes the images API or behaviour causing integration failures with osbuild-composer. The next update of the images dependency in osbuild-composer will need work to adapt to these changes. This is simply a notice. It will not block this PR from being merged. |
This commit changes `reporegistry.New()` to take a new parameter
`repoConfigFS []fs.FS`. With that we can unexport the public
`LoadAllRepositories{,FromFS}` as the only user for those is
`composer` and that can simply use `.New()`.
Note that we could also change `New()` to just take a single
`repoConfig []fs.FS` but the downside of this is that the
error reporting becomes more awkward, i.e. to report what
paths where configured would (probably) require to build
them manually via `fs.FS.Open(".").Stat().Name()` (but
I have not tested this).
This commit breaks the API by changing the confPaths loading in reporegistry to stop prepending `repositories/`. This makes it easier to use this interface in e.g. `cmd/build`. Note that this requires changes in the upstream projecs, notably osbuild-composer and image-builder-cli.
afe4cc0 to
6191f47
Compare
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Feb 6, 2025
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Feb 6, 2025
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
mvo5
added a commit
to mvo5/image-builder-cli
that referenced
this pull request
Feb 6, 2025
This commit updates ibcli for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
achilleas-k
approved these changes
Feb 7, 2025
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Feb 10, 2025
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Feb 10, 2025
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
mvo5
added a commit
to mvo5/image-builder-cli
that referenced
this pull request
Feb 10, 2025
This commit updates ibcli for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
mvo5
added a commit
to mvo5/image-builder-cli
that referenced
this pull request
Feb 10, 2025
This commit updates ibcli for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Feb 11, 2025
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Feb 11, 2025
This commit re-export the `LoadAllRepositories` helper. It was unexported in osbuild#1179 but that was a bit premature as it is still required for advanced use-cases like osbuild/image-builder-cli#113
schuellerf
pushed a commit
to mvo5/osbuild-composer
that referenced
this pull request
Feb 12, 2025
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Feb 13, 2025
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
thozza
pushed a commit
to osbuild/osbuild-composer
that referenced
this pull request
Feb 13, 2025
This commit updates the cloudapi test that uses the real repositories to use the version of those from the "images" library. Composer no longer carries the default repos. Note that this can most likely be simplified once osbuild/images#1179 is merged.
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Feb 14, 2025
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Feb 14, 2025
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
mvo5
added a commit
to mvo5/osbuild-composer
that referenced
this pull request
Feb 18, 2025
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
achilleas-k
pushed a commit
to osbuild/osbuild-composer
that referenced
this pull request
Feb 19, 2025
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
mvo5
added a commit
to mvo5/image-builder-cli
that referenced
this pull request
Dec 8, 2025
This commit updates ibcli for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs osbuild/images#1179
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the API for reporegistry in two incompatible
ways. The important change is that we want to drop the
prepending of
repositorieswhen loading from confPaths.Doing this on its own has the disadvantage of breaking
the API without breaking the builds. So this includes a
small tweak to allow adding repos via fs.FS directly
which will mean the code in ibcli will become simpler:
And for composer it will just be adding a
nilto the New()call.
Note that this also allows us to unexport the LoadAllRepositories
repository loading as this is only used by composer or ibcli.
reporegistry: do not prepend
repositoriesin confPathsThis commit breaks the API by changing the confPaths loading
in reporegistry to stop prepending
repositories/. This makesit easier to use this interface in e.g.
cmd/build.Note that this requires changes in the upstream projecs, notably
osbuild-composer and image-builder-cli.
This commit changes
reporegistry.New()to take a new parameterrepoConfigFS []fs.FS. With that we can unexport the publicLoadAllRepositories{,FromFS}as the only user for those iscomposerand that can simply use.New().